<?php
 $title = 'Products';
 $this->headTitle($title);
 ?>
 
 <h3><?php echo $this->escapeHtml($title);?></h3>
 <p>
     <a href="<?php //echo $this->url('store', array('action'=>'add'));?>" class="btn">Add new product</a>  
 </p>

 <div class="table">
 <table>
 <tr>
     <th>Name</th>
     <th>Discription</th>
     <th>Cost</th> 
     <th>&nbsp;</th>
 </tr>
 <?php foreach ($paginator as $product) : ?>
 <tr>
     <td><?php echo $this->escapeHtml($product->name);?></td>
     <td><?php echo $this->escapeHtml($product->disc);?></td>
     
     <td>
         <a href="<?php echo $this->url('elektronicznysklep',
             array('action'=>'productDetail', 'id' => $product->id));?>">View product</a>
             
         <a href="<?php echo $this->url('elektronicznysklep',
             array('action'=>'delete', 'id' => $product->id));?>">Delete</a>
     </td>
 </tr>
 <?php endforeach; ?>
 </table>
 </div>
 
 <div class="pagination" >
 <span style="text-align: center;">
 <?php
  // add at the end of the file after the table
  //echo $this->paginationControl(
     // the paginator object
     //$this->paginator,
      //the scrolling style
     //'sliding',
      //the partial to use to render the control
     //array('partial/paginator.phtml', 'Store'),
     // the route to link to when a user clicks a control link
     //array(
     //    'route' => 'store'
     //)
 //);
 ?>
 </span>
 </div>
 

